const initialState = {
    arr:[],
    radius:["50%"]
}

export default (state = initialState, { type, payload }) => {
  switch (type) {

  case "getlist":
    let newarr = [...state.arr]
    newarr = payload
    return { ...state, arr:newarr }
  case "changepie":
    let newradius = [...state.radius]
    newradius = payload
    return {
      ...state,
      radius:newradius
    }
  default:
    return state
  }
}
